import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import './assets/js/rem'

import VueAwesomeSwiper from 'vue-awesome-swiper'
import 'swiper/css/swiper.css'

import Mint from 'mint-ui'
import 'mint-ui/lib/style.css'

import CascadingPicker from 'cascading-picker'
import 'cascading-picker/dist/CascadingPicker.css'

// 导入axios发起请求的包
import axios from 'axios'

// 配置请求的根路径
axios.defaults.baseURL = '/'
// eslint-disable-next-line no-irregular-whitespace
axios.defaults.headers.post['Content-Type'] = 'application/json'

Vue.prototype.$axios = axios
Vue.use(Mint)

// 插件使用时提供一个name属性用于更改组件注册的名称，默认名称为CascadingPicker，主要是为了避免和其他ui库命名冲突
Vue.use(CascadingPicker, {
  name: 'AlanCascadingPicker' // 此时组件注册后的名称为AlanCascadingPicker
})

Vue.config.productionTip = false
Vue.use(VueAwesomeSwiper)

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
